1. Technical Field
The present invention relates to data processing systems, and in particular to the temporary designation and utilization of a plurality of physical registers as a stack in a superscalar data processing system. Still more particularly, the present invention relates to a method and system in a superscalar data processing system for the determination of a quantity of physical registers to be temporarily designated as a stack and the temporary designation of the physical registers as the stack.
2. Description of the Related Art
A superscalar data processing system is a data processing system which includes a microprocessor architecture which is capable of executing multiple instructions per clock cycle. In order to execute multiple instructions per clock cycle, multiple independent functional units that can execute concurrently are required. Instructions are first fetched and then decoded. The overlap of the fetching and decoding of one instruction with the execution of a second instruction is called pipelining. In pipelined superscalar data processing systems, care must be taken to avoid dependencies where multiple instructions are fetched, decoded, and executed in a single cycle.
Some microprocessor architectures utilize a "stack" during the processing of instructions. A stack is a designated dynamic area of memory, either main memory or a cache, that stores temporary logical register information and return addresses of subroutines. The stack includes elements which are the multiple, contiguous storage locations into which data may be stored. The number of elements may expand or contract over time by having elements added to or removed from it. The stack is addressed by a stack pointer which is the address of the top of the stack. The top of the stack is the memory location which contains the data item most recently stored in the stack during a "PUSH" operation. Typically, a stack supports two types of operations, a PUSH and a POP. A PUSH operation adds an element to the top of the stack. A POP operation removes an element from the top of the stack.
A stack is a software programming model. When this model is mapped to hardware, it is implemented in main memory and temporarily resides in a cache. Although the programmer may treat elements in the stack as if they are registers, the elements are not actual physical registers. They are either main memory or cache locations. Therefore, accessing data stored in elements in a stack are subject to the performance problems associated with the accessing of memory.
Therefore a need exists for a method and system in a superscalar data processing system for temporarily designating and utilizing a plurality of physical registers as a stack.